package org.example.strategy;

/**
 * @author Zhang Yu
 * @description: 打折
 * @date 2024/5/20 14:22
 */
public class CashRebate implements CashSuper{

    /**
     * 折扣
     */
    private double rebate;


    public CashRebate(double rebate) {
        this.rebate = rebate;
    }

    @Override
    public double acceptCash(double money) {
        return money * rebate;
    }
}
